<?php

use App\Events\DemoEvent;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Redis;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::any('/t', function () {
    event(new DemoEvent('123'));
//    broadcast(new DemoEvent());
//    return view('welcome');
});

Route::any('info','\App\Http\Controllers\UserController@getphpinfo');//phpinfo
Route::any('register','\App\Http\Controllers\UserController@register')->middleware(['cors','business']);//注册
Route::any('login','\App\Http\Controllers\UserController@login')->middleware(['cors']); //登录
Route::any('edit','\App\Http\Controllers\UserController@edit')->middleware(['isLogin','cors','business']); //修改用户信息
Route::any('password','\App\Http\Controllers\UserController@password')->middleware(['isLogin','cors','business']); //修改密码
Route::any('getuserinfo','\App\Http\Controllers\UserController@getuserinfo')->middleware(['isLogin','cors','business']); //获取用户信息
Route::any('getUsers','\App\Http\Controllers\UserController@getUsers')->middleware(['cors','business']); //修改文件夹权限
Route::any('getuserinfo','\App\Http\Controllers\UserController@getuserinfo')->middleware(['isLogin','cors','business']); //获取用户信息
Route::any('newUser','\App\Http\Controllers\UserController@newUser')->middleware(['isLogin','cors','business']); //新用户审批
Route::any('getNewUsers','\App\Http\Controllers\UserController@getNewUsers')->middleware(['isLogin','cors','business']); //拉取注册用户申请列表


Route::any('addlist','\App\Http\Controllers\ListController@addlist')->middleware(['isLogin','cors','business']); //添加目录
Route::any('del','\App\Http\Controllers\ListController@dellist')->middleware(['isLogin','cors','business']); //删除目录
Route::any('editlist','\App\Http\Controllers\ListController@editlist')->middleware(['isLogin','cors','business']); //修改目录名
Route::any('getlist','\App\Http\Controllers\ListController@getlist')->middleware(['isLogin','cors']);//获取列表
Route::any('upload','\App\Http\Controllers\FileController@upload')->middleware(['isLogin','cors','business']);//上传文件
//Route::any('preview','\App\Http\Controllers\FileController@preview')->middleware(['isLogin','cors']);  //文件预览
Route::any('preview','\App\Http\Controllers\FileController@preview')->middleware(['cors']);  //文件预览
Route::any('getfiles','\App\Http\Controllers\FileController@getfiles')->middleware(['isLogin','cors','business']); //获取文件列表
Route::any('delfile','\App\Http\Controllers\FileController@delfile')->middleware(['isLogin','cors','business']); //删除文件
Route::any('updatefile','\App\Http\Controllers\FileController@updatefile')->middleware(['isLogin','cors','business']);//修改文件名
Route::any('queryfile','\App\Http\Controllers\FileController@queryfile')->middleware(['isLogin','cors']);//条件查询指定文件
Route::any('download','\App\Http\Controllers\FileController@download')->middleware(['isLogin','cors']);// 下载文件
//Route::any('download','\App\Http\Controllers\FileController@download')->middleware(['cors']);// 下载文件
Route::any('redis','\App\Http\Controllers\UserController@redis')->middleware(['cors']);// 广博测试


Route::any('getFlowList','\App\Http\Controllers\FlowController@getFlowList')->middleware(['isLogin','cors']); //获取流程列表
Route::any('getOrderFlowList','\App\Http\Controllers\FlowController@getOrderFlowList')->middleware(['isLogin','cors']); //按序筛选流程列表
Route::any('check','\App\Http\Controllers\FlowController@check')->middleware(['isLogin','cors']); //审批操作->审批后发通知
Route::any('getCheckList','\App\Http\Controllers\FlowController@getCheckList')->middleware(['isLogin','cors']); //管理员获取待审批流程列表
Route::any('getAllUsers','\App\Http\Controllers\FlowController@getAllUsers')->middleware(['isLogin','cors']); //查看所有员工：默认管理员排在前面


Route::any('getMsgList','\App\Http\Controllers\MessageController@getMsgList')->middleware(['isLogin','cors']); //获取消息列表
Route::any('messageDealed','\App\Http\Controllers\MessageController@messageDealed')->middleware(['isLogin','cors']); //消息已读
Route::any('delMsg','\App\Http\Controllers\MessageController@delMsg')->middleware(['isLogin','cors']); //删除消息

Route::any('root','\App\Http\Controllers\RootController@root')->middleware(['isLogin','cors','business']); //初始化用户并分配权限
Route::any('editUserRoots','\App\Http\Controllers\RootController@editUserRoot')->middleware(['isLogin','cors','business']); //修改用户权限
Route::any('editFileRoot','\App\Http\Controllers\RootController@editFileRoot')->middleware(['isLogin','cors','business']); //修改文件权限


Route::any('countFile','\App\Http\Controllers\EChartController@countFile')->middleware(['isLogin','cors']); //修改文件权限
Route::any('getPercent','\App\Http\Controllers\EChartController@getPercent')->middleware(['isLogin','cors']); //修改文件权限
Route::any('getYesterday','\App\Http\Controllers\EChartController@getYesterday')->middleware(['isLogin','cors']); //获取昨日长传量
Route::any('getMost','\App\Http\Controllers\EChartController@getMost')->middleware(['isLogin','cors']); //获取上传最多用户
